<template>
  <div>
      <ul class="ul">
      <li v-for="(b,i) in list" :key="i" @click="wan(b)">
        <img :src="b.room_src" alt="">
        <p>{{b.room_name}}</p>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list:[],
      id:1,
    }
  },
 methods: {
   getList(){
    let url = `/abc/api/RoomApi/live/${this.id}`;
    this.$http.get(url).then((res) => {
      this.list = res.data.data
      console.log(this.list);
    });
   },
    wan(a){
      window.location=(a.url)
    },
 },
  created() {
    this.id = this.$route.query.id * 1;
    this.getList();
  },
}
</script>
<style>
   
</style>